package com.ruoyi.parking.service.impl;

import com.ruoyi.parking.domain.ParkRules;
import com.ruoyi.parking.mapper.ParkRulesMapper;
import com.ruoyi.parking.service.IParkRulesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 收费规则Service业务层处理
 * 
 * @author chenkai
 * @date 2025-02-08
 */
@Service
public class ParkRulesServiceImpl implements IParkRulesService 
{
    @Autowired
    private ParkRulesMapper parkRulesMapper;

    /**
     * 查询收费规则
     * 
     * @param rulesId 收费规则主键
     * @return 收费规则
     */
    @Override
    public ParkRules selectParkRulesByRulesId(Long rulesId)
    {
        return parkRulesMapper.selectParkRulesByRulesId(rulesId);
    }

    /**
     * 查询收费规则列表
     * 
     * @param parkRules 收费规则
     * @return 收费规则
     */
    @Override
    public List<ParkRules> selectParkRulesList(ParkRules parkRules)
    {
        return parkRulesMapper.selectParkRulesList(parkRules);
    }

    /**
     * 新增收费规则
     * 
     * @param parkRules 收费规则
     * @return 结果
     */
    @Override
    public int insertParkRules(ParkRules parkRules)
    {
        return parkRulesMapper.insertParkRules(parkRules);
    }

    /**
     * 修改收费规则
     * 
     * @param parkRules 收费规则
     * @return 结果
     */
    @Override
    public int updateParkRules(ParkRules parkRules)
    {
        return parkRulesMapper.updateParkRules(parkRules);
    }

    /**
     * 批量删除收费规则
     * 
     * @param rulesIds 需要删除的收费规则主键
     * @return 结果
     */
    @Override
    public int deleteParkRulesByRulesIds(Long[] rulesIds)
    {
        return parkRulesMapper.deleteParkRulesByRulesIds(rulesIds);
    }

    /**
     * 删除收费规则信息
     * 
     * @param rulesId 收费规则主键
     * @return 结果
     */
    @Override
    public int deleteParkRulesByRulesId(Long rulesId)
    {
        return parkRulesMapper.deleteParkRulesByRulesId(rulesId);
    }
}
